﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<FindPharmacies.Model.Pharmacy>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Admin
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Admin</h2>

    <table>
        <tr>
            <th></th>
            <th>
                PharmacyID
            </th>
            <th>
                Name
            </th>
            <th>
                Street
            </th>
            <th>
                No
            </th>
            <th>
                Zip
            </th>
            <th>
                City
            </th>
            <th>
                State
            </th>
            <th>
                OpeningHours
            </th>
            <th>
                EmergencyService
            </th>
            <th>
                EmergencyTimes
            </th>
            <th>
                Phone
            </th>
            <th>
                Email
            </th>
            <th>
                Website
            </th>
            <th>
                Latitude
            </th>
            <th>
                Longitude
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.PharmacyID }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.PharmacyID })%>
            </td>
            <td>
                <%: item.PharmacyID %>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Street %>
            </td>
            <td>
                <%: item.No %>
            </td>
            <td>
                <%: item.Zip %>
            </td>
            <td>
                <%: item.City %>
            </td>
            <td>
                <%: item.State %>
            </td>
            <td>
                <%: item.OpeningHours %>
            </td>
            <td>
                <%: item.EmergencyService %>
            </td>
            <td>
                <%: item.EmergencyTimes %>
            </td>
            <td>
                <%: item.Phone %>
            </td>
            <td>
                <%: item.Email %>
            </td>
            <td>
                <%: item.Website %>
            </td>
            <td>
                <%: String.Format("{0:F6}", item.Latitude) %>
            </td>
            <td>
                <%: String.Format("{0:F6}", item.Longitude) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

